<template>
	<div>
		<i :class="['zh-iconfont','zh-loading','zh-icon-loading'+type,{[`zh-font-${color}`]:color}]"></i>
	</div>
</template>

<script>
	// 支持的loading类型
	const LoadTypes = [1, 2, 3, 4, 5, 6, 7, 8];
	export default {
		// 组件名称
		name: 'zh-loading',
		// 组件参数 接收来自父组件的数据
		props: {
			type: {
				type: Number,
				default: 1,
				validator(value) {
					return LoadTypes.includes(value);
				}
			},
			color: String,
		},
	}
</script>

<style scoped>

</style>
